package 面向对象;

import org.junit.Test;

import java.util.Random;
import java.util.Scanner;

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("面向对象.HelloWorld");
    }

    @Test
    public void test1(){
        System.out.println("test1");
    }
    @Test
    public void test2(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入成绩:");
        int grade = scanner.nextInt();
        if(grade>60){
            System.out.println("及格");
        }
        else {
            System.out.println("不及格");
        }
    }
    @Test
    public void test3(){
//        //fori
//        for (int i = 0; i < 10; i++) {
//            System.out.println(i);
//        }
        int random = new Random().nextInt(100);
        System.out.println(random);
    }
    @Test
    public void test4(){
        String str = "abs sd 8o2(*78bska";
        char[] chars = str.toCharArray();
        System.out.println(chars.length);
    }
}
